package com.CmJava.tomcat.Server.service;

import com.CmJava.tomcat.Server.Component;

import com.CmJava.tomcat.Server.life.Lifecycle;
import com.CmJava.tomcat.Server.life.LifecycleState;
import com.CmJava.tomcat.Server.service.connector.Connector;
import com.CmJava.tomcat.Server.service.container.Container;

public class Service implements Lifecycle, Component {
    private LifecycleState lifecycleState=LifecycleState.NEW;
    public static Connector connector;
    public static Container container;

    public Service() {
        init();
    }

    @Override
    public void init() {
        container=new Container(null);
        container.init();
        connector=new Connector();
        connector.init();
        lifecycleState=LifecycleState.INITIALIZED;
    }

    @Override
    public void start() {
        connector.start();
    }

    @Override
    public void stop() {

    }

    @Override
    public void destroy() {

    }

    @Override
    public LifecycleState getState() {
        return null;
    }

    @Override
    public Component getChild() {
        return null;
    }

    @Override
    public void setChild(Component child) {

    }
}
